1. Field of the Invention
This invention relates generally to input switches for digital devices. More particularly, it relates to the conservation of valuable digital input/output (DIO) pins and ports in a digital device or circuit by providing a circuit and technique for a multi-position switch to be sensed using a single DIO pin.
2. Background of Related Art
Increased competition for less expensive electronics drives designers to increase the capabilities while reducing the number of components. For instance, as a result, programmable devices such as Digital Signal Processors (DSPs) are packed with more and more functionality. Moreover, to reduce the size and cost of such devices, the number of input and output pins are preferably kept to a minimum.
However, trends in consumer electronics such as telephone answering devices (TADs) and cordless phones require more and more user selectable features. To allow for the large number of features, the user is often provided with a number of multi-position switches to select desired features. Many features, e.g., digitally selected speaker volume, ringer on/off, number of rings until auto-answer, etc. have in the past used multi-position switches to provide immediate visible xe2x80x9cfeedbackxe2x80x9d of the selected feature as determined by the physical position of the multi-position switch.
Unfortunately, multi-position switches each require a corresponding plurality of input pins to a suitable DIO device to allow a host processor to determine its position.
FIG. 5 shows a conventional circuit for measuring multiple positions of a multi-position switch using a corresponding plurality of input pins of a suitable digital input/output (DIO) device.
In particular, in FIG. 5, a multi-position switch 510 pulls to ground any one of a plurality of input pins to a suitable digital input/output (DIO) device 530. The input pins are otherwise pulled-up to a power source level, either using external resistors 520 as shown in FIG. 5, and/or using internal current paths (e.g., transistors) to the power source within the DIO device 530 itself.
The relevant input pins of the DIO device 530 are read once at a suitable time by the processor 540, and the position of the multi-position switch 510 is determined by locating the logic low pin of the DIO device 530.
Unfortunately, as is seen in FIG. 5, as the number of positions of the multi-position switch increases, and/or as the number of multi-position switches increases in any particular design, so too does the required number of input pins in a suitable DIO device.
There is a need for an apparatus and technique which allows the positions of larger multi-position switches and/or more multi-position switches to be detected without necessarily increasing the number of input pins in a related DIO device.
In accordance with the principles of the present invention, a digital circuit for measuring a plurality of positions of a multi-position switch using a single digital input pin comprises a multi-position switch having at least three positions. A clock signal is input to at least one position node of the multi-position switch. A digital input device has a single digital input pin in communication with a common node of the multi-position switch.
A digital circuit for measuring a plurality of positions of a multi-position switch using a single digital input pin in accordance with another aspect of the present invention comprises a multi-position switch. A series resistor chain is connected at one end to a power source. The series resistor chain forms a plurality of nodes each connected to a corresponding input position of the multi-position switch. A digital input device having a single digital input pin is included, as is an RC network between a common node of the multi-position switch and the single digital input pin.
A method of determining a position of each of a plurality of multi-position switches in accordance with yet another aspect of the present invention comprises combining a first multi-position switch in series with a second multi-position switch. An output of the second multi-position switch is input into a single digital input pin. A position of the first multi-position switch and a position of the second multi-position switch are determined by repeatedly sampling the single digital input pin.
A method of determining a position of a multi-position switch having at least three positions using a single digital input pin in accordance with still another aspect of the present invention comprises inputting a clock signal to at least one input position of the multi-position switch. A signal other than the clock signal is input to another input position of the multi-position switch. The single digital input pin is repeatedly sampled to determine a presence of the clock signal.